You are here: Resources > Performance Tips > Share Tasks

Share Tasks

When developing and testing rules and actions, you usually create a task for each rule or action within a session so that you can easily see the results for each task.

If you have multiple rules or actions that run on the same class name, then it is quicker to run these within the same task. This is because when an object is "grabbed" we can run all the relevant rules or actions while it is to hand. Otherwise, if the rules or actions are all in their own tasks, then all the objects in the relevant class are cycled through for each task.

Note: Be careful with actions; the order of how rules or actions are run within the same task is not guaranteed. For rules this does not matter as rules are stateless (i.e. they don’t change the state of the data so the order doesn’t matter) but for actions, you often rely on the order in which they are run. If this is the case then you will need multiple tasks to run your actions in order to guarantee the order in which they are run.